import 'package:xinxuan/vo/common_vo/common_pagination_vo.dart';
import 'package:xinxuan/vo/common_vo/common_seckill_detail_data_vo.dart';
import 'package:xinxuan/vo/common_vo/common_times_vo.dart';

class DisplacementListVo {

  List<CommonSeckillDetailDataVo>? data;
  DisplacementListMeta? meta;

  DisplacementListVo({this.data, this.meta});

  DisplacementListVo.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = [];
      json['data'].forEach((v) {
        data!.add(new CommonSeckillDetailDataVo.fromJson(v));
      });
    }
    meta = json['meta'] != null ? new DisplacementListMeta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    if (this.meta != null) {
      data['meta'] = this.meta!.toJson();
    }
    return data;
  }
}

class DisplacementListMeta {
  CommonTimesVo? times;
  CommonPagination? pagination;

  DisplacementListMeta({this.times, this.pagination});

  DisplacementListMeta.fromJson(Map<String, dynamic> json) {
    times = json['times'] != null ? new CommonTimesVo.fromJson(json['times']) : null;
    pagination = json['pagination'] != null
        ? new CommonPagination.fromJson(json['pagination'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.times != null) {
      data['times'] = this.times!.toJson();
    }
    if (this.pagination != null) {
      data['pagination'] = this.pagination!.toJson();
    }
    return data;
  }
}
